<template>
	<cu-page>
		<template v-if='dataEmpty'>
			<cu-empty empty-title="暂无数据"></cu-empty>
		</template>
		<template v-else>
			<cu-panel v-for='(item, index) in sources' :key="index">
				<view class="list-item">
					{{index}} -- {{getLast4Id(item.orderRunningId)}}
				</view>
			</cu-panel>
		</template>
		<view class="load-more-box">
			<uni-load-more :status="loadMoreStatus" :contentText="loadMoreContent" iconType="snow"></uni-load-more>
		</view>
	</cu-page>
</template>

<script>
	import CommonListPageMixin from "@/git-submodule/lee-common-js/mixins/common-page-list-mixin.js"
	import {
		getRequest,
	} from "@/git-submodule/lee-common-js/utils/request/index.js";
	import {
		RequestParam
	} from "@/git-submodule/lee-common-js/utils/request/requestModels";
	export default {
		mixins: [CommonListPageMixin],
		name: "cu-components",
		props: {},
		data() {
			return {};
		},
		computed: {},
		watch: {},
		onLoad() {
			this.pageSize = 10;
		},
		onReady() {
			uni.startPullDownRefresh({

			})
		},
		methods: {
			getLast4Id(orderRunningId) {
				return orderRunningId.substr(orderRunningId.length - 4, 4)
			},
			requestListData() {
				return getRequest(new RequestParam({
					url: "/deliver/order/running/page/hall",
					data: {
						pageIndex: this.pageIndex,
						pageSize: this.pageSize
					}
				}))
			}
		},
	}
</script>

<style lang="scss" scoped>
	.list-item {
		font-size: 50rpx;
		font-weight: bold;
		color: #333;
		height: 250rpx;
		line-height: 250rpx;
		text-align: center;
	}
</style>